import { API_ENUM, API_CONFIG } from './api'
import type { MenuData, MenuParams } from "@/api/types/menu/index";
import { hocksApi } from '@/api/utils/apiProcessingHocks';
import type { AxiosResponse } from 'axios';

// 菜单栏 /api/menu/role
const roleMenuApi = (params: MenuParams): Promise<MenuData> => {
  return hocksApi(API_CONFIG[API_ENUM.MENU_ROLE], params, (response: AxiosResponse<any>): MenuData => {
    return response.data as MenuData;
  }).post();
}
export { roleMenuApi };